
import java.util.Scanner;
public class ex16{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char []c=new char[s.length()];
        for(int i=0;i<s.length();i++)
        {
            c[i]=s.charAt(i);
        }
        for(int i=0;i<c.length;i++){
            if(c[i]>=97&&c[i]<=122)
            {
                int k=(int)c[i]-32;
                System.out.println((char)k);
            }
            if(c[i]>=65&&c[i]<=90)
            {
                int j = (int)c[i]+32;
                System.out.println((char)j);
            }
        }


    }
}
